Configuring SIP Message Manipulation
SIP Message Manipulation enables you to configure customized rules that modify SIP messages as they pass through the device — whether for normalization, header manipulation, or adapting message content to match the requirements of specific SIP peers for interoperability. A message manipulation rule defines a manipulation sequence for SIP messages. SIP message manipulation enables the normalization of SIP messaging fields between communicating network segments. For example, it allows service providers to design their own policies on the SIP messaging fields that must be present before a SIP call enters their network. Similarly, enterprises and small businesses may have policies for the information that can enter or leave their networks for policy or security reasons from a service provider. SIP message manipulations can also be implemented to resolve incompatibilities between SIP devices inside the enterprise network.
SIP Message Manipulation is configured using the following tables with parent-child hierarchy:
■ | Parent table - Message Manipulation Sets: This table defines a logical name for the group of manipulation rules. You later can associate this set (name) with other entities (e.g., IP Groups), as discussed later in this section. |
The maximum number of Message Manipulation Sets that you can configure is
■ | Child table - Message Manipulations: This table defines the individual manipulation rules for the selected Message Manipulation Set. |
The maximum number of Message Manipulation rules that you can configure (regardless of configured Message Manipulation Sets) is
Once you've configured Message Manipulation Sets and their manipulation rules, you need to assign them to device configuration entities, according to your needs:
■ | Message manipulation rules can be applied before or after the device's Classification stage: |
● | Pre-classification: Message manipulation can be done on incoming SIP dialog-initiating messages (e.g., INVITE) prior to classification. You configure this by assigning the Message Manipulation Set to the SIP Interface on which the call is received (see Configuring SIP Interfaces). |
● | Post-classification: Message manipulation can be done on inbound and/or outbound SIP messages after the call has been successfully classified. Manipulation occurs only after the routing process - inbound message manipulation is done first, then outbound number manipulation (see Configuring IP-to-IP Outbound Manipulations), and then outbound message manipulation. For viewing the call processing flow, see Call Processing of SIP Dialog Requests. You configure this by assigning the Message Manipulation Set to the relevant IP Group in the IP Groups table (see Configuring IP Groups). |
■ | SIP requests initiated by device: You can apply message manipulation to SIP requests that are initiated by the device, for example, SIP REGISTERs for certain entities (e.g., Accounts) and keep-alive by SIP OPTIONS. If the destination of the request is an IP Group, the device uses the Inbound and Outbound Manipulation Sets that are assigned to the IP Group. If there is no IP Group for the destination or the IP Group is not assigned an Inbound or Outbound Manipulation Set, then the global parameters [GWInboundManipulationSet] or [GWOutboundManipulationSet] are used. The [GWInboundManipulationSet] parameter defines the Message Manipulation Set that is applied to incoming responses for requests that the device initiated. The [GWOutboundManipulationSet] parameter defines the Message Manipulation Set that is applied to outgoing requests that the device initiates. |
■ | Applying two Message Manipulation Sets to IP Groups: You can assign two Message Manipulation Sets to an IP Group for inbound and outbound SIP messages. This may be useful, for example, if you want to assign the same Message Manipulation Set to multiple IP Groups, but also want to assign specific message manipulation rules (an additional Message Manipulation Set) only to a specific IP Group(s). You configure this by using the IP Group's 'Additional Inbound Manipulation Set' and 'Additional Outbound Manipulation Set' parameters. |
The device also supports a built-in SIP message normalization feature that can be enabled per Message Manipulation rule. The normalization feature removes unknown SIP message elements before forwarding the message. These elements can include SIP headers, SIP header parameters, and SDP body fields.
The device's SIP message manipulation feature supports the following:
■ | Manipulating SIP message types (method, request/response, and response type). |
■ | Adding SIP headers. |
■ | Removing SIP headers ("block list"). |
■ | Modifying SIP header components such as values, header values (e.g., copying URI of P-Asserted-Identity header to From header), and call's parameter values. |
■ | Deleting SIP body (e.g., if not supported by destination network). |
■ | Translating one SIP response code to another. |
■ | Topology hiding (generally present in SIP headers such as Via, Record Route, Route and Service-Route). |
■ | Configuring identity hiding (information related to identity of subscribers, for example, P-Asserted-Identity, Referred-By, Identity and Identity-Info). |
■ | Applying multiple manipulation rules on the same SIP message. |
■ | Applying a Message Manipulation Set twice on SIP REGISTER messages -- first on the initial incoming unauthenticated REGISTER, and then again on the incoming authenticated SIP message received after the device sends a SIP 401 response for challenging the initial REGISTER request. For more information, see the [AuthenticatedMessageHandling] parameter. |
■ | Using conditions for message manipulation rules (on parts of message or calls parameters). |
■ | Using the same condition for multiple manipulation rules. The following figure shows a configuration example where rules #1 and #2 use the same condition ('Row Rule' is Use Previous Condition) as rule #0 ('Row Rule' is Use Current Condition). For more information, see the description of the 'Row Rule' parameter in this section. |
The following figure illustrates an example of a SIP message that's manipulated by the device as follows:
1. | Removes the "Unknown_header: unknown_value" in the incoming message. |
2. | Changes the P-Asserted-Identity header value to "sip:200@10.33.216.1" in the outgoing message. |
The above manipulation example is achieved by configuring two Message Manipulation Sets, each with a specific message manipulation rule. Message Manipulation Set #1 is assigned to the source IP Group and Message Manipulation Set #2 is assigned to the destination IP Group.
Parameter |
Rule of Message Manipulation Set #1 |
Rule of Message Manipulation Set #2 |
---|---|---|
'Message Type' |
Invite.request |
Invite.request |
'Condition ' |
Header.Unkown_header !contains 'unknown_value' |
Header.P-Asserted-Identity.URL.User == 'Susan' |
'Action Subject ' |
Header.Unkown_header |
Header.P-Asserted-Identity |
'Action Type' |
Remove |
Modify |
'Action Value' |
|
'<sip:200@212.3.216.1>' |
● | For a detailed description of the syntax for configuring message manipulation rules, refer to the document SIP Message Manipulation Reference Guide |
● | Inbound message manipulation is done only after the Classification, inbound and outbound number manipulation, and routing processes. |
● | Each message can be manipulated twice - on the source leg and on the destination leg (i.e., source and destination IP Groups). |
● | Unknown SIP parts can only be added or removed. |
● | SIP manipulations do not allow you to remove or add mandatory SIP headers. They can only be modified and only on requests that initiate new dialogs. Mandatory SIP headers include To, From, Via, CSeq, Call-Id, and Max-Forwards. |
● | The IP Group's 'SIP Group Name' parameter overrides inbound message manipulation rules that manipulate the host name in Request-URI, To, and/or From SIP headers. If you configure a SIP Group Name for the IP Group (see Configuring IP Groups) and you want to manipulate the host name in these SIP headers, you must apply your manipulation rule (Message Manipulation Set) to the IP Group as an Outbound Message Manipulation Set ('Outbound Manipulation Set' parameter), when the IP Group is the destination of the call. If you apply the Message Manipulation Set as an Inbound Message Manipulation Set ('Inbound Manipulation Set' parameter), when the IP Group is the source of the call, the manipulation rule is overridden by the 'SIP Group Name'. |
● | When configuring a message manipulation rule for manipulating a SIP header, the maximum length (characters) of the header's value in the incoming SIP message that can be manipulated is 4,096. |
The following procedure describes how to configure SIP Message Manipulation through the Web interface. You can also configure it through ini file and CLI:
■ | Message Manipulation Sets table (parent): |
● | ini file: [MsgManSet] |
● | CLI: configure voip > message msg-man-set |
■ | Message Manipulations table (child): |
● | ini file: [MessageManipulations] |
● | CLI: configure voip > message msg-man-set > message-manipulations |
➢ | To configure SIP message manipulation: |
1. | Open the Message Manipulation Sets table (Setup menu > Signaling & Media tab > Message Manipulation folder > Message Manipulation Sets). |
2. | Click New; the following dialog box appears: |
3. | Configure a Message Manipulation Set according to the parameters described in the following table, and then click Apply. |
Message Manipulation Sets Table (Parent) Parameter Description
Parameter |
Description |
---|---|
'Index' [Index] |
Defines an index number for the new table row. Note: Each row must be configured with a unique index. |
'Name' name [Name] |
Defines a descriptive name, which is used when associating the row in other tables. The valid value is a string of up to 40 characters. By default, no value is defined. |
4. | Select the index row of the Message Manipulation Set that you added, and then click the Message Manipulations link located below the table; the Message Manipulations table opens. |
5. | Click New; the following dialog box appears: |
6. | Configure a Message Manipulation rule according to the parameters described in the following below, and then click Apply. |
Message Manipulations Table (Child) Parameter Descriptions
Parameter |
Description |
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
General | |||||||||||||||||||||||||
'Index' [Index] |
Defines an index number for the new table row. Note: Each row must be configured with a unique index. |
||||||||||||||||||||||||
'Name' manipulation-name [ManipulationName] |
Defines a descriptive name, which is used when associating the row in other tables. The valid value is a string of up to 40 characters. |
||||||||||||||||||||||||
manipulation-set-id [ManSetID] |
Assigns the rule to a Message Manipulation Set (by its ID). The default is 0. Note: This parameter is applicable only for CLI and ini file configuration. |
||||||||||||||||||||||||
'Row Role' row-role [RowRole] |
Determines which message manipulation condition (configured by the 'Condition' parameter) to use for the rule.
Note:
|
||||||||||||||||||||||||
Match |
|||||||||||||||||||||||||
'Message Type' message-type [MessageType] |
Defines the SIP message type that you want to manipulate. The valid value is a string (case-insensitive) denoting the SIP message. You can use the built-in syntax editor to help you configure the field. Click the Editor button located alongside the field to open the Editor, and then simply follow the on-screen instructions. For example:
Note: Currently, SIP 100 Trying messages cannot be manipulated. |
||||||||||||||||||||||||
'Condition' condition [Condition] |
Defines the condition that must exist for the rule to be applied. The valid value is a string of up to 200 characters (case-insensitive). You can use the built-in syntax editor to help you configure the field. Click the Editor button located alongside the field to open the Editor, and then simply follow the on-screen instructions. For example:
|
||||||||||||||||||||||||
Action |
|
||||||||||||||||||||||||
'Action Subject' action-subject [ActionSubject] |
Defines the SIP header upon which the manipulation is performed. The valid value is a string (case-insensitive). You can use the built-in syntax editor to help you configure the field. Click the Editor button located alongside the field to open the Editor, and then simply follow the on-screen instructions. |
||||||||||||||||||||||||
'Action Type' action-type [ActionType] |
Defines the type of manipulation.
|
||||||||||||||||||||||||
'Action Value' action-value [ActionValue] |
Defines a value that you want to use in the manipulation. The default value is a string (case-insensitive) in the following syntax:
For example:
You can use the built-in syntax editor to help you configure the field. Click the Editor button located alongside the field to open the Editor, and then simply follow the on-screen instructions. Note: Only single quotation marks must be used. |